package com.muzuo.pdf.util;

import org.springframework.util.ObjectUtils;
import com.muzuo.pdf.entity.SexEnum;

public class DictionaryUtil {
    
    public String getValueByKey(Object key){
        if (ObjectUtils.isEmpty(key)) {
            return "未知";
        }
        
        for (SexEnum sex : SexEnum.values()) {
            if (sex.getCode().equals(key.toString())) {
                return sex.getDesc();
            }
        }
        return key.toString();
    }
}
